#pragma once

#include <string>
#include "RedisClient.h"
#include "Singleton.h"
#include "1700_account.pb.h"

const unsigned int g_cache_dur = 172800;
class Cache 
{
public:
    Cache();
    virtual ~Cache();

public:
    static Cache* Instance()
	{
		return CSingleton<Cache>::Instance();
	}

public:
	bool Set(const std::string& uuid, const std::uint32_t uid, const std::string& agency, const std::string& username, const std::uint32_t agency_id, const std::string& token, const std::string& hall_url, const std::string& platform, const std::int64_t balance, const std::string& currency, const std::string& ext);
	bool InfoSet(const std::string& uuid, const std::uint32_t uid, const std::string& agency, const std::string& username, const std::uint32_t agency_id, const std::string& token, const std::string& hall_url, const std::string& platform, const std::int64_t balance, const std::string& currency, const std::string& ext);
	bool InfoGet(const std::uint32_t uid, std::string& uuid, std::string& agency, std::string& username, std::uint32_t& agency_id, std::string& token, std::string& hall_url, std::string& platform, std::int64_t& balance, std::string& currency, std::string& ext);
	bool TokenUpdate(const std::uint32_t uid, const std::string& token);
	bool Uid(const std::string& uuid, std::uint32_t& uid);
	bool UidSet(const std::string& uuid, const std::uint32_t uid);

public:
	RedisClient* m_userinfoRedis;
};












